package common.util.log;

import org.apache.log4j.DailyRollingFileAppender;
import org.apache.log4j.Priority;

/**
 * 重写Log4J,支持按级别拆分日志文件
 * @author WangXin
 *
 */
public class Log4jFileAppender extends DailyRollingFileAppender {
	 	
		@Override  
	    public boolean isAsSevereAsThreshold(Priority priority) {    
	          //只判断是否相等，而不判断优先级     
	       return this.getThreshold().equals(priority);  
	       // return super.isAsSevereAsThreshold(priority);
	    }
		
}
